(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 10.1' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[     32745,       1148]
NotebookOptionsPosition[     29942,       1046]
NotebookOutlinePosition[     30315,       1062]
CellTagsIndexPosition[     30272,       1059]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell[BoxData[
 RowBox[{"NIntegrate", "[", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{"1", "/", "2"}], "/", "\[Pi]"}], "*", 
     RowBox[{"1", "/", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"1", "/", "4"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"1.2", "-", "p"}], ")"}], "^", "2"}]}], ")"}]}], "*", 
     RowBox[{"Exp", "[", 
      RowBox[{"-", "p"}], "]"}]}], "+", 
    RowBox[{
     RowBox[{
      RowBox[{"1", "/", "2"}], "/", "\[Pi]"}], "*", 
     RowBox[{"1", "/", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"1", "/", "4"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"1.2", "+", "p"}], ")"}], "^", "2"}]}], ")"}]}], "*", 
     RowBox[{"Exp", "[", 
      RowBox[{"-", "p"}], "]"}]}]}], ",", 
   RowBox[{"{", 
    RowBox[{"p", ",", "0", ",", "Infinity"}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.8237240184087896`*^9, 3.8237240777272344`*^9}, {
  3.823724731709646*^9, 3.823724731827785*^9}, {3.8237252913255672`*^9, 
  3.8237252997266684`*^9}, {3.8237253594409833`*^9, 3.823725363178072*^9}}],

Cell[BoxData["0.3049654050417231`"], "Output",
 CellChangeTimes->{{3.823724053873434*^9, 3.823724078609491*^9}, 
   3.8237243793153687`*^9, 3.823724732311906*^9, 3.8237253004423723`*^9, 
   3.82372536374074*^9, 3.8237310306517253`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Integrate", "[", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{"1", "/", "2"}], "/", "\[Pi]"}], "*", 
    RowBox[{"1", "/", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"1", "/", "4"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "p"}], ")"}], "^", "2"}]}], ")"}]}], "*", 
    RowBox[{"Exp", "[", 
     RowBox[{"-", "p"}], "]"}]}], ",", "p"}], "]"}]], "Input",
 CellChangeTimes->{3.823724337576826*^9}],

Cell[BoxData[
 RowBox[{
  FractionBox["1", 
   RowBox[{"2", " ", "\[Pi]"}]], 
  RowBox[{"\[ImaginaryI]", " ", 
   SuperscriptBox["\[ExponentialE]", 
    RowBox[{
     RowBox[{"-", "1"}], "-", 
     FractionBox["\[ImaginaryI]", "2"]}]], " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      SuperscriptBox["\[ExponentialE]", "\[ImaginaryI]"], " ", 
      RowBox[{"ExpIntegralEi", "[", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", 
          FractionBox["\[ImaginaryI]", "2"]}], ")"}], "-", "p"}], "]"}]}], 
     "-", 
     RowBox[{"ExpIntegralEi", "[", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", 
         FractionBox["\[ImaginaryI]", "2"]}], ")"}], "-", "p"}], "]"}]}], 
    ")"}]}]}]], "Output",
 CellChangeTimes->{3.8237243384963255`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"%", "/.", 
  RowBox[{"p", "\[Rule]", "0"}]}]], "Input",
 CellChangeTimes->{{3.8237243453198185`*^9, 3.8237243587740774`*^9}}],

Cell[BoxData[
 RowBox[{
  FractionBox["1", 
   RowBox[{"2", " ", "\[Pi]"}]], 
  RowBox[{"\[ImaginaryI]", " ", 
   SuperscriptBox["\[ExponentialE]", 
    RowBox[{
     RowBox[{"-", "1"}], "-", 
     FractionBox["\[ImaginaryI]", "2"]}]], " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      SuperscriptBox["\[ExponentialE]", "\[ImaginaryI]"], " ", 
      RowBox[{"ExpIntegralEi", "[", 
       RowBox[{"1", "-", 
        FractionBox["\[ImaginaryI]", "2"]}], "]"}]}], "-", 
     RowBox[{"ExpIntegralEi", "[", 
      RowBox[{"1", "+", 
       FractionBox["\[ImaginaryI]", "2"]}], "]"}]}], ")"}]}]}]], "Output",
 CellChangeTimes->{3.8237243598065653`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"N", "[", "%", "]"}]], "Input",
 CellChangeTimes->{{3.823724361177348*^9, 3.8237243623736453`*^9}}],

Cell[BoxData[
 RowBox[{"0.028689430937829538`", "\[VeryThinSpace]", "-", 
  RowBox[{"1.0408340855860843`*^-17", " ", "\[ImaginaryI]"}]}]], "Output",
 CellChangeTimes->{3.8237243626469135`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"Integrate", "[", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"1", "/", "2"}], "/", "\[Pi]"}], "/", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"1", "/", "4"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"k", "-", "p"}], ")"}], "^", "2"}]}], ")"}]}], "*", 
     RowBox[{"1", "/", 
      RowBox[{"p", "^", "2"}]}]}], ",", "p"}], "]"}], "//", 
  "Simplify"}]], "Input",
 CellChangeTimes->{{3.823726223664508*^9, 3.8237262674691305`*^9}, {
  3.823726449652751*^9, 3.8237264881282873`*^9}}],

Cell[BoxData[
 RowBox[{"-", 
  FractionBox[
   RowBox[{"2", " ", 
    RowBox[{"(", 
     RowBox[{"1", "+", 
      RowBox[{"4", " ", 
       SuperscriptBox["k", "2"]}], "+", 
      RowBox[{"2", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", 
         RowBox[{"4", " ", 
          SuperscriptBox["k", "2"]}]}], ")"}], " ", "p", " ", 
       RowBox[{"ArcTan", "[", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{"k", "-", "p"}], ")"}]}], "]"}]}], "+", 
      RowBox[{"4", " ", "k", " ", "p", " ", 
       RowBox[{"Log", "[", 
        RowBox[{"1", "+", 
         RowBox[{"4", " ", 
          SuperscriptBox[
           RowBox[{"(", 
            RowBox[{"k", "-", "p"}], ")"}], "2"]}]}], "]"}]}], "-", 
      RowBox[{"8", " ", "k", " ", "p", " ", 
       RowBox[{"Log", "[", 
        RowBox[{"-", "p"}], "]"}]}]}], ")"}]}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "2"], " ", "p", " ", 
    "\[Pi]"}]]}]], "Output",
 CellChangeTimes->{{3.8237262582036104`*^9, 3.8237262681044254`*^9}, {
  3.823726477240778*^9, 3.823726489503804*^9}}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"f1", "[", 
   RowBox[{"k_", ",", "kc_"}], "]"}], ":=", 
  RowBox[{"NIntegrate", "[", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"1", "/", "2"}], "/", "\[Pi]"}], "/", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"1", "/", "4"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"k", "-", "p"}], ")"}], "^", "2"}]}], ")"}]}], "/", 
     RowBox[{"p", "^", "2"}]}], ",", 
    RowBox[{"{", 
     RowBox[{"p", ",", "kc", ",", "Infinity"}], "}"}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.823727165687036*^9, 3.823727193479967*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"f2", "[", 
   RowBox[{"k_", ",", "kc_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{"2", "/", "\[Pi]"}], "/", "kc"}], "/", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"4", "*", 
       RowBox[{"k", "^", "2"}]}], "+", "1"}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"4", "/", "\[Pi]"}], "*", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{
       RowBox[{"4", "*", 
        RowBox[{"k", "^", "2"}]}], "-", "1"}], ")"}], "/", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"4", "*", 
         RowBox[{"k", "^", "2"}]}], "+", "1"}], ")"}], "^", "2"}]}], "*", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"\[Pi]", "/", "2"}], "+", 
      RowBox[{"ArcTan", "[", 
       RowBox[{"2", "*", 
        RowBox[{"(", 
         RowBox[{"k", "-", "kc"}], ")"}]}], "]"}]}], ")"}]}], "+", 
   RowBox[{"8", "*", 
    RowBox[{
     RowBox[{"k", "/", "\[Pi]"}], "/", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"4", "*", 
         RowBox[{"k", "^", "2"}]}], "+", "1"}], ")"}], "^", "2"}]}], "*", 
    RowBox[{"Log", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", 
         RowBox[{"4", "*", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"k", "-", "kc"}], ")"}], "^", "2"}]}]}], ")"}], "/", 
       "4"}], "/", 
      RowBox[{"kc", "^", "2"}]}], "]"}]}]}]}]], "Input",
 CellChangeTimes->{{3.8237271947026606`*^9, 3.8237272650348597`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"f1", "[", 
  RowBox[{"1", ",", "1"}], "]"}]], "Input",
 CellChangeTimes->{{3.823727279554639*^9, 3.823727281422903*^9}}],

Cell[BoxData["0.22611717037581844`"], "Output",
 CellChangeTimes->{3.823727281901579*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"f2", "[", 
   RowBox[{"1", ",", "1"}], "]"}], "//", "N"}]], "Input",
 CellChangeTimes->{{3.8237272826258845`*^9, 3.823727285240272*^9}}],

Cell[BoxData["0.22611717037581924`"], "Output",
 CellChangeTimes->{3.823727285663125*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"f1", "[", 
  RowBox[{
   RowBox[{"-", "1"}], ",", "1"}], "]"}]], "Input",
 CellChangeTimes->{{3.8237272912506523`*^9, 3.8237272936945734`*^9}}],

Cell[BoxData["0.017371979686450455`"], "Output",
 CellChangeTimes->{3.82372729444951*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"f2", "[", 
   RowBox[{
    RowBox[{"-", "1"}], ",", "1"}], "]"}], "//", "N"}]], "Input",
 CellChangeTimes->{{3.823727295652651*^9, 3.823727298335478*^9}}],

Cell[BoxData["0.01737197968645257`"], "Output",
 CellChangeTimes->{3.8237272987302694`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"k", "=", 
   RowBox[{
    RowBox[{"RandomReal", "[", "]"}], "-", 
    RowBox[{"1", "/", "2"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"kc", "=", 
   RowBox[{
    RowBox[{"RandomReal", "[", "]"}], "-", 
    RowBox[{"1", "/", "2"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{"f1", "[", 
    RowBox[{"k", ",", "kc"}], "]"}], "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{"f2", "[", 
    RowBox[{"k", ",", "kc"}], "]"}], "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.8237273046253986`*^9, 3.823727326221846*^9}}],

Cell[CellGroupData[{

Cell[BoxData["1.919165982880343`"], "Print",
 CellChangeTimes->{{3.8237273266413517`*^9, 3.823727335751436*^9}}],

Cell[BoxData["1.919165982880336`"], "Print",
 CellChangeTimes->{{3.8237273266413517`*^9, 3.82372733575347*^9}}]
}, Open  ]]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"Clear", "[", "k", "]"}], ";", 
  RowBox[{"Clear", "[", "p", "]"}], ";", 
  RowBox[{"Clear", "[", "kc", "]"}]}]], "Input",
 CellChangeTimes->{{3.8237275134886923`*^9, 3.8237275234114122`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"Integrate", "[", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"1", "/", "2"}], "/", "\[Pi]"}], "/", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"1", "/", "4"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"k", "-", "p"}], ")"}], "^", "2"}]}], ")"}]}], "/", 
     RowBox[{"p", "^", "4"}]}], ",", "p"}], "]"}], "//", 
  "FullSimplify"}]], "Input",
 CellChangeTimes->{{3.823727508680043*^9, 3.823727508905435*^9}, {
  3.82372757353857*^9, 3.8237275745143995`*^9}, {3.8237293574260664`*^9, 
  3.823729357590557*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"-", 
   FractionBox["1", 
    RowBox[{"3", " ", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"1", "+", 
        RowBox[{"4", " ", 
         SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
     SuperscriptBox["p", "3"], " ", "\[Pi]"}]]}], 
  RowBox[{"(", 
   RowBox[{"48", " ", 
    SuperscriptBox["p", "3"], " ", 
    RowBox[{"(", 
     RowBox[{"4", " ", "k", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "1"}], "+", 
        RowBox[{"4", " ", 
         SuperscriptBox["k", "2"]}]}], ")"}], " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"Log", "[", 
         RowBox[{"1", "+", 
          RowBox[{"4", " ", 
           SuperscriptBox[
            RowBox[{"(", 
             RowBox[{"k", "-", "p"}], ")"}], "2"]}]}], "]"}], "-", 
        RowBox[{"2", " ", 
         RowBox[{"Log", "[", "p", "]"}]}]}], ")"}]}], ")"}]}], ")"}]}]], \
"Input",
 CellChangeTimes->{{3.8237296095144005`*^9, 3.8237296095393324`*^9}, 
   3.82372988851717*^9}],

Cell[BoxData[
 RowBox[{"-", 
  FractionBox[
   RowBox[{"64", " ", "k", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", 
      RowBox[{"4", " ", 
       SuperscriptBox["k", "2"]}]}], ")"}], " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"Log", "[", 
       RowBox[{"1", "+", 
        RowBox[{"4", " ", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"k", "-", "p"}], ")"}], "2"]}]}], "]"}], "-", 
      RowBox[{"2", " ", 
       RowBox[{"Log", "[", "p", "]"}]}]}], ")"}]}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
    "\[Pi]"}]]}]], "Output",
 CellChangeTimes->{3.8237296103422937`*^9, 3.82372988900483*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"-", 
   FractionBox["1", 
    RowBox[{"3", " ", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"1", "+", 
        RowBox[{"4", " ", 
         SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
     SuperscriptBox["p", "3"], " ", "\[Pi]"}]]}], 
  RowBox[{"(", 
   RowBox[{"4", " ", "k", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", 
      RowBox[{"4", " ", 
       SuperscriptBox["k", "2"]}]}], ")"}], " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"Log", "[", 
       RowBox[{"1", "+", 
        RowBox[{"4", " ", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"k", "-", "p"}], ")"}], "2"]}]}], "]"}], "-", 
      RowBox[{"2", " ", 
       RowBox[{"Log", "[", "p", "]"}]}]}], ")"}]}], ")"}]}]], "Input",
 CellChangeTimes->{{3.8237276526934543`*^9, 3.8237276535811663`*^9}, {
  3.823727851599783*^9, 3.823727867851372*^9}, {3.823727920761858*^9, 
  3.8237279346366463`*^9}}],

Cell[BoxData[
 RowBox[{"-", 
  FractionBox[
   RowBox[{"4", " ", "k", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", 
      RowBox[{"4", " ", 
       SuperscriptBox["k", "2"]}]}], ")"}], " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"Log", "[", 
       RowBox[{"1", "+", 
        RowBox[{"4", " ", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"k", "-", "p"}], ")"}], "2"]}]}], "]"}], "-", 
      RowBox[{"2", " ", 
       RowBox[{"Log", "[", "p", "]"}]}]}], ")"}]}], 
   RowBox[{"3", " ", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
    SuperscriptBox["p", "3"], " ", "\[Pi]"}]]}]], "Output",
 CellChangeTimes->{3.8237279350305576`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Expand", "[", "%", "]"}]], "Input",
 CellChangeTimes->{{3.8237276579750338`*^9, 3.8237276603214717`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"-", 
   FractionBox["2", 
    RowBox[{"3", " ", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"1", "+", 
        RowBox[{"4", " ", 
         SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
     SuperscriptBox["p", "3"], " ", "\[Pi]"}]]}], "-", 
  FractionBox[
   RowBox[{"8", " ", 
    SuperscriptBox["k", "2"]}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
    SuperscriptBox["p", "3"], " ", "\[Pi]"}]], "-", 
  FractionBox[
   RowBox[{"32", " ", 
    SuperscriptBox["k", "4"]}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
    SuperscriptBox["p", "3"], " ", "\[Pi]"}]], "-", 
  FractionBox[
   RowBox[{"128", " ", 
    SuperscriptBox["k", "6"]}], 
   RowBox[{"3", " ", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
    SuperscriptBox["p", "3"], " ", "\[Pi]"}]], "-", 
  FractionBox[
   RowBox[{"8", " ", "k"}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
    SuperscriptBox["p", "2"], " ", "\[Pi]"}]], "-", 
  FractionBox[
   RowBox[{"64", " ", 
    SuperscriptBox["k", "3"]}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
    SuperscriptBox["p", "2"], " ", "\[Pi]"}]], "-", 
  FractionBox[
   RowBox[{"128", " ", 
    SuperscriptBox["k", "5"]}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
    SuperscriptBox["p", "2"], " ", "\[Pi]"}]], "+", 
  FractionBox["8", 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", "p", " ", "\[Pi]"}]], 
  "-", 
  FractionBox[
   RowBox[{"64", " ", 
    SuperscriptBox["k", "2"]}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", "p", " ", "\[Pi]"}]], 
  "-", 
  FractionBox[
   RowBox[{"384", " ", 
    SuperscriptBox["k", "4"]}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", "p", " ", 
    "\[Pi]"}]]}]], "Output",
 CellChangeTimes->{3.823727660714411*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"f3", "[", 
   RowBox[{"k_", ",", "kc_"}], "]"}], ":=", 
  RowBox[{"NIntegrate", "[", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"1", "/", "2"}], "/", "\[Pi]"}], "/", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"1", "/", "4"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"k", "-", "p"}], ")"}], "^", "2"}]}], ")"}]}], "/", 
     RowBox[{"p", "^", "4"}]}], ",", 
    RowBox[{"{", 
     RowBox[{"p", ",", "kc", ",", "Infinity"}], "}"}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.823728738104312*^9, 3.8237287668653965`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"f4", "[", 
   RowBox[{"k_", ",", "kc_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{"2", "/", "3"}], "/", "\[Pi]"}], "/", 
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", "*", 
        RowBox[{"k", "^", "2"}]}]}], ")"}]}], "/", 
    RowBox[{"kc", "^", "3"}]}], "+", 
   RowBox[{"8", "*", 
    RowBox[{
     RowBox[{
      RowBox[{"k", "/", "\[Pi]"}], "/", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", 
         RowBox[{"4", "*", 
          RowBox[{"k", "^", "2"}]}]}], ")"}], "^", "2"}]}], "/", 
     RowBox[{"kc", "^", "2"}]}]}], "+", 
   RowBox[{"8", "*", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"48", "*", 
          RowBox[{"k", "^", "4"}]}], "+", 
         RowBox[{"8", "*", 
          RowBox[{"k", "^", "2"}]}], "-", "1"}], ")"}], "/", "\[Pi]"}], "/", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", 
         RowBox[{"4", "*", 
          RowBox[{"k", "^", "2"}]}]}], ")"}], "^", "4"}]}], "/", "kc"}]}], 
   "+", 
   RowBox[{
    RowBox[{"16", "/", "\[Pi]"}], "*", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{
       RowBox[{"16", "*", 
        RowBox[{"k", "^", "4"}]}], "-", 
       RowBox[{"24", "*", 
        RowBox[{"k", "^", "2"}]}], "+", "1"}], ")"}], "/", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", 
        RowBox[{"4", "*", 
         RowBox[{"k", "^", "2"}]}]}], ")"}], "^", "4"}]}], "*", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"\[Pi]", "/", "2"}], "+", 
      RowBox[{"ArcTan", "[", 
       RowBox[{"2", "*", 
        RowBox[{"(", 
         RowBox[{"k", "-", "kc"}], ")"}]}], "]"}]}], ")"}]}], "+", 
   RowBox[{"64", "*", 
    RowBox[{"k", "/", "\[Pi]"}], "*", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{
       RowBox[{"4", "*", 
        RowBox[{"k", "^", "2"}]}], "-", "1"}], ")"}], "/", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"4", "*", 
         RowBox[{"k", "^", "2"}]}], "+", "1"}], ")"}], "^", "4"}]}], "*", 
    RowBox[{"Log", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", 
         RowBox[{"4", "*", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"k", "-", "kc"}], ")"}], "^", "2"}]}]}], ")"}], "/", 
       "4"}], "/", 
      RowBox[{"kc", "^", "2"}]}], "]"}]}]}]}]], "Input",
 CellChangeTimes->{{3.823728770074087*^9, 3.823728834487047*^9}, {
  3.823728865107091*^9, 3.8237288826895695`*^9}, {3.8237289640799227`*^9, 
  3.823728985744773*^9}, {3.8237290939519005`*^9, 3.8237290942937307`*^9}, {
  3.823729470317194*^9, 3.8237294707500362`*^9}, {3.8237296478065844`*^9, 
  3.823729655000566*^9}, {3.823729752402601*^9, 3.823729761527111*^9}, {
  3.823729841179719*^9, 3.823729842714893*^9}, {3.8237298980575447`*^9, 
  3.823729899678579*^9}, {3.823729930081319*^9, 3.823729930236901*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"f3", "[", 
  RowBox[{
   RowBox[{"-", "1.2"}], ",", "2.1"}], "]"}]], "Input",
 CellChangeTimes->{{3.8237289928188515`*^9, 3.8237289939598527`*^9}, {
  3.823729376593458*^9, 3.8237293800985575`*^9}, {3.8237306097600174`*^9, 
  3.823730619582754*^9}}],

Cell[BoxData["0.00035496017686113856`"], "Output",
 CellChangeTimes->{
  3.8237289944831896`*^9, {3.823729371758607*^9, 3.8237293805922832`*^9}, 
   3.8237303988020473`*^9, 3.8237306200929103`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"f4", "[", 
   RowBox[{
    RowBox[{"-", "1.4"}], ",", "0.8"}], "]"}], "//", "N"}]], "Input",
 CellChangeTimes->{{3.82372899538913*^9, 3.823728998649352*^9}, {
  3.823730666759449*^9, 3.823730670737715*^9}}],

Cell[BoxData["0.016004864095692947`"], "Output",
 CellChangeTimes->{
  3.823728998990405*^9, {3.8237290969787493`*^9, 3.823729102386505*^9}, 
   3.8237293734892926`*^9, 3.823729473325822*^9, 3.8237296602540283`*^9, 
   3.8237297557466164`*^9, 3.823729845534402*^9, 3.823729933175085*^9, 
   3.823730400719154*^9, 3.8237305199807177`*^9, 3.823730671160058*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"f4", "[", 
  RowBox[{"k", ",", "kc"}], "]"}]], "Input",
 CellChangeTimes->{{3.8237305265562935`*^9, 3.823730528241022*^9}}],

Cell[BoxData[
 RowBox[{
  FractionBox["2", 
   RowBox[{"3", " ", 
    RowBox[{"(", 
     RowBox[{"1", "+", 
      RowBox[{"4", " ", 
       SuperscriptBox["k", "2"]}]}], ")"}], " ", 
    SuperscriptBox["kc", "3"], " ", "\[Pi]"}]], "+", 
  FractionBox[
   RowBox[{"8", " ", "k"}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "2"], " ", 
    SuperscriptBox["kc", "2"], " ", "\[Pi]"}]], "+", 
  FractionBox[
   RowBox[{"8", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", 
      RowBox[{"8", " ", 
       SuperscriptBox["k", "2"]}], "+", 
      RowBox[{"48", " ", 
       SuperscriptBox["k", "4"]}]}], ")"}]}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", "kc", " ", "\[Pi]"}]],
   "+", 
  FractionBox[
   RowBox[{"16", " ", 
    RowBox[{"(", 
     RowBox[{"1", "-", 
      RowBox[{"24", " ", 
       SuperscriptBox["k", "2"]}], "+", 
      RowBox[{"16", " ", 
       SuperscriptBox["k", "4"]}]}], ")"}], " ", 
    RowBox[{"(", 
     RowBox[{
      FractionBox["\[Pi]", "2"], "+", 
      RowBox[{"ArcTan", "[", 
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{"k", "-", "kc"}], ")"}]}], "]"}]}], ")"}]}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", "\[Pi]"}]], "+", 
  FractionBox[
   RowBox[{"64", " ", "k", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", 
      RowBox[{"4", " ", 
       SuperscriptBox["k", "2"]}]}], ")"}], " ", 
    RowBox[{"Log", "[", 
     FractionBox[
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox[
         RowBox[{"(", 
          RowBox[{"k", "-", "kc"}], ")"}], "2"]}]}], 
      RowBox[{"4", " ", 
       SuperscriptBox["kc", "2"]}]], "]"}]}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
    "\[Pi]"}]]}]], "Output",
 CellChangeTimes->{3.8237305286469364`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"a", "=", 
   RowBox[{
    RowBox[{"RandomReal", "[", "]"}], "-", 
    RowBox[{"1", "/", "2"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"b", "=", 
   RowBox[{"RandomReal", "[", "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{"f3", "[", 
    RowBox[{"a", ",", "b"}], "]"}], "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{"f4", "[", 
    RowBox[{"a", ",", "b"}], "]"}], "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.8237299394016943`*^9, 3.8237299921898785`*^9}}],

Cell[CellGroupData[{

Cell[BoxData["19.47568028569925`"], "Print",
 CellChangeTimes->{{3.823729964346953*^9, 3.823730000940562*^9}}],

Cell[BoxData["19.475680285699227`"], "Print",
 CellChangeTimes->{{3.823729964346953*^9, 3.823730000942355*^9}}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"f4", "[", 
  RowBox[{"k", ",", "kc"}], "]"}]], "Input",
 CellChangeTimes->{{3.823729766244469*^9, 3.8237297690727367`*^9}}],

Cell[BoxData[
 RowBox[{
  FractionBox["2", 
   RowBox[{"3", " ", 
    RowBox[{"(", 
     RowBox[{"1", "+", 
      RowBox[{"4", " ", 
       SuperscriptBox["k", "2"]}]}], ")"}], " ", 
    SuperscriptBox["kc", "3"], " ", "\[Pi]"}]], "+", 
  FractionBox[
   RowBox[{"8", " ", "k"}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "2"], " ", 
    SuperscriptBox["kc", "2"], " ", "\[Pi]"}]], "+", 
  FractionBox[
   RowBox[{"8", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", 
      RowBox[{"8", " ", 
       SuperscriptBox["k", "2"]}], "+", 
      RowBox[{"48", " ", 
       SuperscriptBox["k", "4"]}]}], ")"}]}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", "kc", " ", "\[Pi]"}]],
   "+", 
  FractionBox[
   RowBox[{"16", " ", 
    RowBox[{"(", 
     RowBox[{"1", "-", 
      RowBox[{"24", " ", 
       SuperscriptBox["k", "2"]}], "+", 
      RowBox[{"16", " ", 
       SuperscriptBox["k", "4"]}]}], ")"}], " ", 
    RowBox[{"(", 
     RowBox[{
      FractionBox["\[Pi]", "2"], "+", 
      RowBox[{"ArcTan", "[", 
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{"k", "-", "kc"}], ")"}]}], "]"}]}], ")"}]}], 
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", "\[Pi]"}]], "+", 
  FractionBox[
   RowBox[{"4", " ", "k", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", 
      RowBox[{"4", " ", 
       SuperscriptBox["k", "2"]}]}], ")"}], " ", 
    RowBox[{"Log", "[", 
     FractionBox[
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox[
         RowBox[{"(", 
          RowBox[{"k", "-", "kc"}], ")"}], "2"]}]}], 
      RowBox[{"4", " ", 
       SuperscriptBox["kc", "2"]}]], "]"}]}], 
   RowBox[{"3", " ", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
    "\[Pi]"}]]}]], "Output",
 CellChangeTimes->{3.823729769927274*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"-", 
   FractionBox["1", 
    RowBox[{"3", " ", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"1", "+", 
        RowBox[{"4", " ", 
         SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
     SuperscriptBox["p", "3"], " ", "\[Pi]"}]]}], 
  RowBox[{"(", 
   RowBox[{"4", " ", "k", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", 
      RowBox[{"4", " ", 
       SuperscriptBox["k", "2"]}]}], ")"}], " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"Log", "[", 
       RowBox[{"1", "+", 
        RowBox[{"4", " ", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"k", "-", "p"}], ")"}], "2"]}]}], "]"}], "-", 
      RowBox[{"2", " ", 
       RowBox[{"Log", "[", "p", "]"}]}]}], ")"}]}], ")"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"-", 
  FractionBox[
   RowBox[{"4", " ", "k", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", 
      RowBox[{"4", " ", 
       SuperscriptBox["k", "2"]}]}], ")"}], " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"Log", "[", 
       RowBox[{"1", "+", 
        RowBox[{"4", " ", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"k", "-", "p"}], ")"}], "2"]}]}], "]"}], "-", 
      RowBox[{"2", " ", 
       RowBox[{"Log", "[", "p", "]"}]}]}], ")"}]}], 
   RowBox[{"3", " ", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"4", " ", 
        SuperscriptBox["k", "2"]}]}], ")"}], "4"], " ", 
    SuperscriptBox["p", "3"], " ", "\[Pi]"}]]}]], "Output",
 CellChangeTimes->{3.8237298074738827`*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{"NIntegrate", "["}]], "Input",
 CellChangeTimes->{{3.823731013114665*^9, 3.823731014792018*^9}}]
},
WindowSize->{1536, 781},
WindowMargins->{{-8, Automatic}, {Automatic, -8}},
Magnification:>2. Inherited,
FrontEndVersion->"10.1 for Microsoft Windows (64-bit) (March 23, 2015)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[580, 22, 1094, 32, 124, "Input"],
Cell[1677, 56, 235, 3, 117, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[1949, 64, 462, 15, 60, "Input"],
Cell[2414, 81, 783, 25, 93, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[3234, 111, 149, 3, 60, "Input"],
Cell[3386, 116, 652, 19, 93, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[4075, 140, 122, 2, 60, "Input"],
Cell[4200, 144, 192, 3, 59, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[4429, 152, 576, 18, 60, "Input"],
Cell[5008, 172, 1189, 36, 124, "Output"]
}, Open  ]],
Cell[6212, 211, 612, 19, 60, "Input"],
Cell[6827, 232, 1474, 50, 137, "Input"],
Cell[CellGroupData[{
Cell[8326, 286, 144, 3, 60, "Input"],
Cell[8473, 291, 89, 1, 84, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[8599, 297, 171, 4, 60, "Input"],
Cell[8773, 303, 89, 1, 84, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[8899, 309, 167, 4, 60, "Input"],
Cell[9069, 315, 89, 1, 84, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[9195, 321, 189, 5, 60, "Input"],
Cell[9387, 328, 91, 1, 84, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[9515, 334, 638, 19, 175, "Input"],
Cell[CellGroupData[{
Cell[10178, 357, 112, 1, 43, "Print"],
Cell[10293, 360, 111, 1, 43, "Print"]
}, Open  ]]
}, Open  ]],
Cell[10431, 365, 226, 5, 60, "Input"],
Cell[10660, 372, 601, 18, 60, "Input"],
Cell[CellGroupData[{
Cell[11286, 394, 1011, 33, 113, InheritFromParent],
Cell[12300, 429, 773, 26, 124, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[13110, 460, 966, 30, 113, "Input"],
Cell[14079, 492, 792, 26, 124, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[14908, 523, 129, 2, 60, "Input"],
Cell[15040, 527, 2754, 98, 207, "Output"]
}, Open  ]],
Cell[17809, 628, 614, 19, 60, "Input"],
Cell[18426, 649, 2906, 90, 200, "Input"],
Cell[CellGroupData[{
Cell[21357, 743, 273, 6, 85, "Input"],
Cell[21633, 751, 197, 3, 84, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[21867, 759, 241, 6, 85, "Input"],
Cell[22111, 767, 359, 5, 84, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[22507, 777, 147, 3, 85, "Input"],
Cell[22657, 782, 2220, 78, 231, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[24914, 865, 587, 17, 200, "Input"],
Cell[CellGroupData[{
Cell[25526, 886, 110, 1, 43, "Print"],
Cell[25639, 889, 111, 1, 43, "Print"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[25799, 896, 147, 3, 60, "Input"],
Cell[25949, 901, 2227, 78, 231, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[28213, 984, 796, 27, 113, "Input"],
Cell[29012, 1013, 792, 26, 124, "Output"]
}, Open  ]],
Cell[29819, 1042, 119, 2, 60, "Input"]
}
]
*)

(* End of internal cache information *)

